<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<link rel="stylesheet" href="../template/assets/css/amazeui.min.css"/>
<link rel="stylesheet" href="../template/website/css/app.css"/>
</head>
<body>
<div  style="text-align:center;margin-top:200px;">   
<i class="am-icon-spinner am-icon-pulse"></i> 
<p id="msg" name="msg" class="am-kai"></p>
</div>
</body>
</html> <script type="text/javascript" src="../template/assets/js/jquery.min.js"></script>
 <script type="text/javascript" src="../template/website/js/app.js"></script>

<script type="text/javascript">
    //返回页面分享的参数,当当前页面有canAppS

$(document).ready(function(){    
    console.log("init");
    $(".am-icon-spinner").show();
    $("#msg").hide();

    var params = {"para":window.location.href.split("?")[1]};
    $.ajax({  
        type:'post',      
        url:'../redirect/business',  
        data: params,  
        headers: {
      'token': getParamValue('token'),
      'saleType': getParamValue('saleType')
    },
    success: function(data) {
      if (JSON.parse(data).ResultCode === 1009) {
        alert('登陆超时，请重新登录！');
        jumpToSignin();
        return;
      }
          console.log(data);
          $(".am-icon-spinner").hide();
          if(data){
            var jsonData = JSON.parse(data);
            //console.log(jsonData.resultCode);
            if(jsonData.resultCode==1000){
                window.location.replace(jsonData.data);
            }else{
                //console.log(jsonData.message);
                $("#msg").html(jsonData.message);
                $("#msg").show();
                //window.location.replace("http://baidu.com");
            }
          }else{
            $("#msg").html("服务器请求超时，请联系管理员！");
            $("#msg").show();
          }
        },
        error: function() { 
            $("#msg").html("服务器请求超时，请联系管理员！");
            $("#msg").show();
            $(".am-icon-spinner").hide(); 
        } 
      }); 
});

</script>